from bson import ObjectId
from pymongo import MongoClient

client = MongoClient("127.0.0.1", 27017)
collection = client['mongodb_study']['study']
r = collection.update({'name': '忘川'}, {'$set': {'name': '忘川紫'}}, multi=True)
# collection.update({"name": "忘川紫"}, {"$set": {"name": "忘川"}},multi=True)
print(r)
for x in r:
    print(r)
